import axios from 'axios';
import { req,reqForFile } from './axiosFun';

export const brandList= (params) =>{return req("post","/management-mall/brand/brandList",params)}
export const updateStatus= (params) =>{return req("post","/management-mall/brand/updateStatus",params)}



export const seckillList= (params) =>{return req("post","/management-mall/seckill/seckillList",params)}
export const look= (params) =>{return req("post","/management-mall/seckill/getSeckill",params)}
export const getCount= (params) =>{return req("post","/management-mall/seckill/getCount",params)}
export const saveSeckill= (params) =>{return req("post","/management-mall/seckill/saveSeckill",params)}
export const saveActivity= (params) =>{return req("post","/management-mall/seckill/saveActivity",params)}
export const updateSType= (params) =>{return req("post","/management-mall/seckill/updateSType",params)}
export const updateVType= (params) =>{return req("post","/management-mall/seckill/updateVType",params)}
export const delSeckill= (params) =>{return req("post","/management-mall/seckill/delSeckill",params)}


//商品列表
export const testOss= (params) =>{return reqForFile("post","/management-mall/leyou.mall/mall-goods/test/oss",params)}
export const goodsList= (params) =>{return req("post","/management-mall/leyou.mall/mall-goods/goodsList",params)}
export const goodsChangeState= (params) =>{return req("post","/management-mall/leyou.mall/mall-goods/changeState",params)}
export const goodsDeletes= (params) =>{return req("post","/management-mall/leyou.mall/mall-goods/deletes",params)}
export const goodsDetail= (params) =>{return req("post","/management-mall/leyou.mall/mall-goods/goodsDetail",params)}
export const deleteGoodsPic= (params) =>{return req("post","/management-mall/leyou.mall/mall-goods/deleteGoodsPic",params)}
export const GoodsPicSetMainPic= (params) =>{return req("post","/management-mall/leyou.mall/mall-goods/GoodsPicSetMainPic",params)}

//商品评论
export const goodsCommentByGoodsId= (params) =>{return req("post","/management-mall/leyou.mall/mall-goods-comment/goodsCommentByGoodsId",params)}

//添加商品
export const  goodsInsertFirstStep= (params) =>{return req("post","/management-mall/leyou.mall/mall-goods/goodsInsertFirstStep",params)}
export const goodsInsertSecondStep= (params) =>{return req("post","/management-mall/leyou.mall/mall-goods/goodsInsertSecondStep",params)}
export const goodsInsertThirdStep= (params) =>{return reqJSON("post","/management-mall/leyou.mall/mall-goods/goodsInsertThirdStep",params)}
export const generateSpecs= (params) =>{return reqJSON("post","/management-mall/leyou.mall/mall-goods/generateSpecs",params)}

//商品下拉列表
export const brandListForSelect= () =>{return req("post","/management-mall/brand/brandListForSelect",null)}
//分类管理
export const sortList= (params) =>{return req("post","/management-mall/mallSort/sortList",params)}
export const updateSortStatus= (params) =>{return req("post","/management-mall/mallSort/updateStatus",params)}
export const deleteSort= (params) =>{return req("post","/management-mall/mallSort/deleteSort/"+params)}
export const addSort= (params) =>{return req("post","/management-mall/mallSort/addSort",params)}
